package com.ruoyi.order.domain;

import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

/**
 * 购物车对象 ver_cart
 *
 * @author ruoyi
 * @date 2025-08-21
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class VerCart extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /** 购物车ID（主键 */
    private Long id;

    /**
     * user_id用户ID（外键，关联user表)
     */
    @Excel(name = "user_id用户ID", readConverterExp = "user_id用户ID（外键，关联user表)")
    private Long userId;

    /**
     * 商品SKUID（外键，关联product_sku表)
     */
    @Excel(name = "商品SKUID", readConverterExp = "商品SKUID（外键，关联product_sku表)")
    private Long skuId;

    /**
     * 购买数量
     */
    @Excel(name = "购买数量")
    private String quantity;

    /**
     * 价格
     */
    @Excel(name = "价格")
    private double price;

    /**
     * 原价
     */
    @Excel(name = "原价")
    private double originalPrice;

    /**
     * 图片
     */
    @Excel(name = "图片")
    private String url;


    /**
     * 选中状态（0未选，1选中，用于结算)
     */
    @Excel(name = "选中状态", readConverterExp = "选中状态（0未选，1选中，用于结算)")
    private String selectStatus;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getUserId() {
        return userId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public Long getSkuId() {
        return skuId;
    }

    public void setSkuId(Long skuId) {
        this.skuId = skuId;
    }

    public String getQuantity() {
        return quantity;
    }

    public void setQuantity(String quantity) {
        this.quantity = quantity;
    }

    public String getSelectStatus() {
        return selectStatus;
    }

    public void setSelectStatus(String selectStatus) {
        this.selectStatus = selectStatus;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("userId", getUserId())
                .append("skuId", getSkuId())
                .append("quantity", getQuantity())
                .append("selectStatus", getSelectStatus())
                .append("createTime", getCreateTime())
                .append("updateTime", getUpdateTime())
                .toString();
    }
}
